home *** CD-ROM | disk | FTP | other *** search
- G4C
-
- ; =================================================================
- ; Contains routines to interface FSearch.gc gui with a text editor.
- ; The editor in this case is CygnusEd 3.5 (the one I use), but the
- ; routines can be changed for any editor.
- ; =================================================================
-
- ; CHANGE THE PATH HERE TO YOUR SET UP
-
- xRoutine Check4CedBar ; this is called by other functions in here.
-
- ; if cedbar is not running, fire it up..
- ifexists gui ~cedbar.gc
- ifexists file sq1:guis/cedbar/cedbar.gc ; my setup
- guiload sq1:guis/cedbar/cedbar.gc
- else
- ezreq 'Could not find CedBar.gc' OK ''
- stop ; do nothing..
- endif
- endif
-
- ; -----------------------------------------------------------------
- ; Load a file & goto given line or byte.
- ; filename : the name of the file to be loaded
- ; byte : the position you want to goto (in bytes)
- ; -----------------------------------------------------------------
-
- xRoutine LoadFile filename offset
-
- gosub #this Check4CedBar ; stop if not found..
-
- sendrexx $cedbar.gc/cedport 'jump to file $filename'
- if $$rexxret = 0 ; file not loaded
- sendrexx $cedbar.gc/cedport 'open new'
- sendrexx $cedbar.gc/cedport 'open $filename'
- endif
- sendrexx $cedbar.gc/cedport 'expand view'
-
- if $offset > 0
- if $fsearch.gc/lineswitch == LINE
- sendrexx $cedbar.gc/cedport 'jump to line $offset'
- else
- sendrexx $cedbar.gc/cedport 'jump to byte $offset'
- endif
- endif
-
-
-
-
-